import functools

def note(func):
    "note function"
    @functools.wraps(func)  # 这行注掉不注掉
    def wrapper():
        "wrapper function"
        print('note something')
        return func()
    return wrapper


@note
def test():
    "test function"
    print('I am test')

test()
print(test.__doc__)